package com.vim.modules.web.model;

import com.vim.common.model.base.BaseEntity;
import com.vim.common.utils.NumberTool;

import java.math.BigDecimal;

public class ShopCart extends BaseEntity{
 
	/**主键ID*/
	private String cartId;

	/**用户ID*/
	private String userId;

	/**商品ID*/
	private String goodsId;

	/**商品名称*/
	private String goodsName;

	/**商品图片*/
	private String goodsImage;

	/**商品价格*/
	private BigDecimal goodsPrice;

	/**商品价格页面显示*/
	private String goodsPriceStr;

	/**商品数量*/
	private Integer goodsNum;

	public String getCartId(){
		return cartId;
	}

	public void setCartId(String cartId){
		this.cartId = cartId;
	}

	public String getUserId(){
		return userId;
	}

	public void setUserId(String userId){
		this.userId = userId;
	}

	public String getGoodsId(){
		return goodsId;
	}

	public void setGoodsId(String goodsId){
		this.goodsId = goodsId;
	}

	public String getGoodsName(){
		return goodsName;
	}

	public void setGoodsName(String goodsName){
		this.goodsName = goodsName;
	}

	public String getGoodsImage(){
		return goodsImage;
	}

	public void setGoodsImage(String goodsImage){
		this.goodsImage = goodsImage;
	}

	public BigDecimal getGoodsPrice(){
		return goodsPrice;
	}

	public void setGoodsPrice(BigDecimal goodsPrice){
		this.goodsPrice = goodsPrice;
	}

	public String getGoodsPriceStr() {
		if(null != goodsPrice){
			return NumberTool.formatToNumber(goodsPrice);
		}else{
			return NumberTool.formatToNumber(BigDecimal.ZERO);
		}
	}

	public Integer getGoodsNum(){
		return goodsNum;
	}

	public void setGoodsNum(Integer goodsNum){
		this.goodsNum = goodsNum;
	}

}

